<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title></title>
		
		<style type="text/css">
			*{ margin: 0; padding: 0; box-sizing: border-box; font-family: "microsoft yahei";}
			
			
			.input{ width: 400px; height: 40px; margin: 0 auto; margin-bottom: 20px; position: relative;}
			
			.input > input{ width: 100%; height: 100%; font-size: 14px; padding: 0 15px; outline: none; border: 1px solid #CCCCCC;}
			
			.submit{ text-align: center;}
			.submit > a{ display: inline-block; line-height: 40px; background-color: #007CE6; min-width: 100px; color: #FFFFFF; cursor: pointer;}

		</style>
		
	</head>
	<body>
		
		<div style=" height: 50px;"></div>
		
		<div id="validate">
			
			<div class="input"><input type="text" placeholder="url" is-yz="true" yz-type="null,httpUrl" null-message="不能为空" httpUrl-message="地址错误" /></div>
			<div class="input"><input type="text" placeholder="密码" id="pass1" eq-id="pass2" is-yz="true" yz-type="null,password" null-message="不能为空" password-message="两次密码一致" /></div>
			<div class="input"><input type="text" placeholder="确认密码" id="pass2" eq-id="pass1" is-yz="true" yz-type="null,password" null-message="不能为空" password-message="两次密码一致" /></div>
			<div class="input"><input type="text" placeholder="长度" is-yz="true" yz-type="null,length" min="1" max="20" null-message="不能为空" length-message="长度不能超过10个汉字或20个英文字符" /></div>
			<div class="input"><input type="text" placeholder="邮箱" is-yz="true" yz-type="null,email" null-message="不能为空" email-message="邮箱不正确" /></div>
			<div class="input"><input type="text" placeholder="手机号" is-yz="true" yz-type="null,phone" null-message="不能为空" phone-message="手机号码不正确" /></div>
			
			
			<div class="submit">
				<a id="submit">提交</a>
			</div>
		</div>
		
	</body>
	
	<script type="text/javascript" src="../jquery-1.11.2.min.js"></script>
	
	<link rel="stylesheet" type="text/css" href="validator.css"/>
	<script type="text/javascript" src="validator.js"></script>
	
	<script type="text/javascript">
		
		
		window.form1=$("#validate").validator();
		
		$("#submit").on("click",function(){
			
			console.log(form1.check());
			
		});
		
	</script>
	
	
</html>
